#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main() {
	long n, k;
	while (~scanf("%ld %ld", &n, &k)) {
		if (k == 0) {
			printf("%ld\n", n * n);
			continue;
		}
		long count = 0;
		for (long y = k + 1; y <= n; y++) {
			count += ((n / y) * (y - k)) + ((n % y < k) ? 0 : (n % y - k + 1));
		}
		printf("%ld\n", count);
	}
	return 0;
}